package ckf.man.practice.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ckf.man.practice.entity.BaseData;
import ckf.man.practice.service.BaseDataService;
import ckf.man.practice.mapper.BaseDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
 * @author 昌凯枫
 * @description 针对表【base_data】的数据库操作Service实现
 * @createDate 2024-07-19 11:06:55
 */
@Service
public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper, BaseData>
        implements BaseDataService {
    @Autowired
    private BaseDataMapper mapper;

    @Override
    public List<BaseData> getByEquipmentAndScheme(int equipment_id, int scheme_id) {
        return mapper.selectByEquipmentIdAndSchemeId(equipment_id, scheme_id);
    }

    @Override
    public List<BaseData> getByCreateTime(Date begin, Date end) {
        return mapper.selectByCreateTimeBetween(begin,end);
    }
}




